Allow multiple values for HTTPS_PORT#3622
Conversation
|
|
||
| KJ_SYSCALL(setenv("PORT", kj::str(config.ports[0]).cStr(), true)); | ||
| KJ_IF_MAYBE(httpsPort, config.httpsPort) { | ||
| // TODO(cleanup): At this point, all this does is tell Sandcats to refresh certs. |
There was a problem hiding this comment.
I'm fairly sure at this point this doesn't do anything; the sandcats logic doesn't look for this variable, and grepping around for it didn't come up with any uses.
|
I will definitely test this weekend (partially because if this works I do not want to wait for a release). Running a server backup now, which I always do before updating to experimental code. |
|
Interesting. And this doesn't happen with an extra port added to I will have to actually test this myself soonish. |
|
I don't have any HTTP ports exposed to the outside world, so I don't know, to be honest. I'd probably go for setting up a VM to play with it if I want to start opening those. What I did test (because I was getting the unrecognized hostname on my alternate port) was trying to set up a static web publishing on the alternate port, and that also did not work. |
| auto promise = altPortServer->listenHttp(*listener); | ||
| auto promise = isHttpsPort(port) | ||
| ? tlsManager.listenHttps(*listener) | ||
| : altPortServer->listenHttp(*listener); |
There was a problem hiding this comment.
Could the issue be here? If I can parse this, it means the altPortServer is only being reached if it's an HTTP port?
|
Good catch. Just pushed an attempt to fix this; give it a try when the
build finishes.
|
|
This definitely worked for the main URL, but it appears to not work for anything else. https://ocdhost.sandcats.io/shared/X8HYTaml-nrKIHORyo-C9AwuCzZ0FUoT_-OEXHUw10f even has the same exact hostname, as the main URL, but it gives the unrecognized hostname error. Web publishing didn't work either. |
|
Ok. I'm going to mark this as a draft for now; at some point I'll set up port forwarding myself and mess with it so we can do fewer round trips. |

Fixes #3619
@ocdtrekkie, feel like testing? I have verified it doesn't break my box, but haven't actually tried adding a second port, mainly because I'd have to set up port forwarding and it's late enough that I'm wanting to put this down for the night.